package com.sunlands.deskmate.client;

import com.sunlands.deskmate.config.OauthFeignConfig;
import com.sunlands.deskmate.vo.GroupSimpleInfo;
import com.sunlands.deskmate.vo.GroupUserVO;
import com.sunlands.deskmate.vo.response.BusinessResult;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author shixiaopeng
 */
@SuppressWarnings("unused")
@FeignClient(value = "deskmate-group-api", configuration = OauthFeignConfig.class)
public interface DeskMateGroupService {

    @GetMapping(value = "/group/users")
    BusinessResult<List<GroupUserVO>> getGroupUserByGroupId(@RequestParam(value = "groupId") String groupId);

    @GetMapping(value = "/group/find/groupSimpleInfo")
    BusinessResult<GroupSimpleInfo> getGroupSimpleInfo(@RequestParam(value = "groupId") String groupId);

    @GetMapping(value = "/group/user")
    BusinessResult<GroupUserVO> getGroupUser(@ApiParam(value = "组ID", required = true) @RequestParam(value = "groupId") String groupId,
                                             @ApiParam(value = "用户ID", required = true) @RequestParam(value = "userId") String userId);
}

